<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Aquamat: Plik źródłowy menu.h (r58/r57)</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Wygenerowano przez Doxygen 1.6.1 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Strona&nbsp;główna</span></a></li>
      <li><a href="pages.html"><span>Dodatkowe&nbsp;strony</span></a></li>
      <li><a href="annotated.html"><span>Struktury&nbsp;Danych</span></a></li>
      <li class="current"><a href="files.html"><span>Pliki</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>Lista&nbsp;plików</span></a></li>
      <li><a href="globals.html"><span>Globalne</span></a></li>
    </ul>
  </div>
<h1>menu.h (r58/r57)</h1><a href="menu_8h.html">Idź do dokumentacji tego pliku.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment">    Aquamat - Sterownik akwariowy Open Source</span>
<a name="l00003"></a>00003 <span class="comment">    Copyright (C) 2009 Wojciech Todryk (wojciech@todryk.pl)</span>
<a name="l00004"></a>00004 <span class="comment"></span>
<a name="l00005"></a>00005 <span class="comment">    This program is free software; you can redistribute it and/or modify</span>
<a name="l00006"></a>00006 <span class="comment">    it under the terms of the GNU General Public License as published by</span>
<a name="l00007"></a>00007 <span class="comment">    the Free Software Foundation; either version 2 of the License, or</span>
<a name="l00008"></a>00008 <span class="comment">    (at your option) any later version.</span>
<a name="l00009"></a>00009 <span class="comment"></span>
<a name="l00010"></a>00010 <span class="comment">    This program is distributed in the hope that it will be useful,</span>
<a name="l00011"></a>00011 <span class="comment">    but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00012"></a>00012 <span class="comment">    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
<a name="l00013"></a>00013 <span class="comment">    GNU General Public License for more details.</span>
<a name="l00014"></a>00014 <span class="comment"></span>
<a name="l00015"></a>00015 <span class="comment">    You should have received a copy of the GNU General Public License</span>
<a name="l00016"></a>00016 <span class="comment">    along with this program; if not, write to the Free Software</span>
<a name="l00017"></a>00017 <span class="comment">    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA</span>
<a name="l00018"></a>00018 <span class="comment">    </span>
<a name="l00019"></a>00019 <span class="comment">    $Id$</span>
<a name="l00020"></a>00020 <span class="comment">*/</span>
<a name="l00021"></a>00021 
<a name="l00026"></a>00026 <span class="preprocessor">#include &lt;stdint.h&gt;</span>
<a name="l00027"></a>00027 
<a name="l00028"></a><a class="code" href="menu_8h.html#a3b329336b6f757abe49cbe8c76a79c6c">00028</a> <span class="preprocessor">#define MENU_VARS_LOADED_FLAG 0</span>
<a name="l00029"></a>00029 <span class="preprocessor"></span>
<a name="l00030"></a><a class="code" href="menu_8h.html#aab3216c675ba164c683f630a0088eb4c">00030</a> <span class="preprocessor">#define MENU_SF(x) ms.flags |= _BV(x)</span>
<a name="l00031"></a><a class="code" href="menu_8h.html#aef386cb4adc7b9748ac9a647351c2bbc">00031</a> <span class="preprocessor"></span><span class="preprocessor">#define MENU_CF(x) ms.flags &amp;= ~_BV(x)</span>
<a name="l00032"></a><a class="code" href="menu_8h.html#aeaa22877117e3f4917dd0758cd847270">00032</a> <span class="preprocessor"></span><span class="preprocessor">#define MENU_F(x) ms.flags  &amp; _BV(x)</span>
<a name="l00033"></a>00033 <span class="preprocessor"></span>
<a name="l00034"></a>00034                      <span class="comment">// 0   1   2   3   4</span>
<a name="l00035"></a><a class="code" href="menu_8h.html#ae3ccb8a528e1570cbd7e5d9c62922efbaba595d8bca8bc5e67c37c0a9d89becfa">00035</a> <span class="keyword">enum</span> <a class="code" href="menu_8h.html#ae3ccb8a528e1570cbd7e5d9c62922efb">MENU_KEY</a> {<a class="code" href="menu_8h.html#ae3ccb8a528e1570cbd7e5d9c62922efbac157bdf0b85a40d2619cbc8bc1ae5fe2">NONE</a>,<a class="code" href="menu_8h.html#ae3ccb8a528e1570cbd7e5d9c62922efbaba595d8bca8bc5e67c37c0a9d89becfa">UP</a>,<a class="code" href="menu_8h.html#ae3ccb8a528e1570cbd7e5d9c62922efba9b0b4a95b99523966e0e34ffdadac9da">DOWN</a>,<a class="code" href="menu_8h.html#ae3ccb8a528e1570cbd7e5d9c62922efbaf5297152557c7da396243000ca240e89">ESC</a>,<a class="code" href="menu_8h.html#ae3ccb8a528e1570cbd7e5d9c62922efbab44c8101cc294c074709ec1b14211792">SET</a>};
<a name="l00036"></a>00036 
<a name="l00040"></a><a class="code" href="structMENU__STATE.html">00040</a> <span class="keyword">struct </span><a class="code" href="structMENU__STATE.html" title="Struktura przechowująca stan menu.">MENU_STATE</a>{
<a name="l00041"></a><a class="code" href="structMENU__STATE.html#afe7f08dfffc42f313878ef0deb088eb7">00041</a>     uint8_t <a class="code" href="structMENU__STATE.html#afe7f08dfffc42f313878ef0deb088eb7">menu_id</a>; 
<a name="l00042"></a><a class="code" href="structMENU__STATE.html#a659afc9e3b53e09fde1442b4f1b52482">00042</a>     uint8_t <a class="code" href="structMENU__STATE.html#a659afc9e3b53e09fde1442b4f1b52482">submenu_id</a>; 
<a name="l00043"></a><a class="code" href="structMENU__STATE.html#a6909cf3c0efbad1b75001fed7c542b34">00043</a>     uint8_t <a class="code" href="structMENU__STATE.html#a6909cf3c0efbad1b75001fed7c542b34">mod_phase</a>; 
<a name="l00044"></a><a class="code" href="structMENU__STATE.html#a7f84fa576f2ef977906a6281eaa8af28">00044</a>     uint8_t <a class="code" href="structMENU__STATE.html#a7f84fa576f2ef977906a6281eaa8af28">unit_id</a>; 
<a name="l00053"></a><a class="code" href="structMENU__STATE.html#ab11844d443cefedd06cb49adcc295563">00053</a>         uint8_t <a class="code" href="structMENU__STATE.html#ab11844d443cefedd06cb49adcc295563">flags</a>;
<a name="l00054"></a>00054 };
<a name="l00055"></a>00055 
<a name="l00056"></a>00056 <span class="comment">/* ----------------------------------------------- zmiana stanu ---- */</span>
<a name="l00057"></a>00057 <span class="keywordtype">void</span> <a class="code" href="menu_8c.html#afe6bdb47ff5a40534dbd37961218ce42">menu_set</a>(uint8_t,uint8_t,uint8_t,uint8_t);
<a name="l00058"></a>00058 <span class="keywordtype">void</span> <a class="code" href="menu_8c.html#a963feaea56aba870845478b06493e716">menu_key_phase_up</a> (<span class="keyword">enum</span> <a class="code" href="menu_8h.html#ae3ccb8a528e1570cbd7e5d9c62922efb">MENU_KEY</a>);
<a name="l00059"></a>00059 <span class="keywordtype">void</span> <a class="code" href="menu_8c.html#a524dbf48be2cc442dc5799ac95ba3207">menu_phase_up</a>(<span class="keywordtype">void</span>);
<a name="l00060"></a>00060 uint8_t <a class="code" href="menu_8c.html#a375cb1a3767f0afd79cb3cfc55c05ea3">menu_phase</a>();
<a name="l00061"></a>00061 uint8_t <a class="code" href="menu_8c.html#af1a38014ff0728f55b19aa944cc78043">menu_unit</a>();
<a name="l00062"></a>00062 uint8_t <a class="code" href="menu_8c.html#ae0bd2dc203320f7706c38c8d0984b186">menu_menuid</a>();
<a name="l00063"></a>00063 <span class="keywordtype">void</span> <a class="code" href="menu_8c.html#acb11a96a7fdd8b2514f0b5dd5916c340">menu_reset_phase</a>(<span class="keywordtype">void</span>);
<a name="l00064"></a>00064 <span class="keywordtype">void</span> <a class="code" href="menu_8c.html#a9827adfd5dc55b53afc836494c0ecb22">menu_set_phase</a>(<span class="keywordtype">void</span>);
<a name="l00065"></a>00065 <span class="keywordtype">void</span> <a class="code" href="menu_8c.html#a6ac742fa35b81512a26821b72ca32e32">menu_reset_phase_key</a>(<span class="keyword">enum</span> <a class="code" href="menu_8h.html#ae3ccb8a528e1570cbd7e5d9c62922efb">MENU_KEY</a>);
<a name="l00066"></a>00066 <span class="keywordtype">void</span> <a class="code" href="menu_8c.html#a7b11ad59c94256a4710d666e4612c7f6">menu_unit_next</a> (<span class="keyword">enum</span> <a class="code" href="menu_8h.html#ae3ccb8a528e1570cbd7e5d9c62922efb">MENU_KEY</a>,uint8_t);
<a name="l00067"></a>00067 <span class="keywordtype">void</span> <a class="code" href="menu_8c.html#a5aa178317c43c9f73a94f189d48c8cd4">menu_unit_prev</a> (<span class="keyword">enum</span> <a class="code" href="menu_8h.html#ae3ccb8a528e1570cbd7e5d9c62922efb">MENU_KEY</a>,uint8_t);
<a name="l00068"></a>00068 <span class="keywordtype">void</span> <a class="code" href="menu_8c.html#a83d8f473ae08bb3d45b656f8c80b5ce6">menu_next</a> (<span class="keyword">enum</span> <a class="code" href="menu_8h.html#ae3ccb8a528e1570cbd7e5d9c62922efb">MENU_KEY</a>);
<a name="l00069"></a>00069 <span class="keywordtype">void</span> <a class="code" href="menu_8c.html#ac8b79564a5fb6860dea944cdf9d249e7">menu_prev</a> (<span class="keyword">enum</span> <a class="code" href="menu_8h.html#ae3ccb8a528e1570cbd7e5d9c62922efb">MENU_KEY</a>);
<a name="l00070"></a>00070 <span class="keywordtype">void</span> <a class="code" href="menu_8c.html#aaf8d05e67b09b351d39bce0b30c68f3a">menu_top</a> (<span class="keyword">enum</span> <a class="code" href="menu_8h.html#ae3ccb8a528e1570cbd7e5d9c62922efb">MENU_KEY</a>);
<a name="l00071"></a>00071 <span class="keywordtype">void</span> <a class="code" href="menu_8c.html#ae9e3de307971fd2186c90c0cf4e19f73">menu_submenu_top</a> (<span class="keyword">enum</span> <a class="code" href="menu_8h.html#ae3ccb8a528e1570cbd7e5d9c62922efb">MENU_KEY</a>);
<a name="l00072"></a>00072 <span class="keywordtype">void</span> <a class="code" href="menu_8c.html#aa803467e9095c0da11773a21948dd4e1">menu_submenu_next</a> (<span class="keyword">enum</span> <a class="code" href="menu_8h.html#ae3ccb8a528e1570cbd7e5d9c62922efb">MENU_KEY</a>);
<a name="l00073"></a>00073 <span class="keywordtype">void</span> <a class="code" href="menu_8c.html#acd92c0447f4dc9cb8972e22674d9a093">menu_submenu_prev</a> (<span class="keyword">enum</span> <a class="code" href="menu_8h.html#ae3ccb8a528e1570cbd7e5d9c62922efb">MENU_KEY</a> key);
<a name="l00074"></a>00074 <span class="keywordtype">void</span> <a class="code" href="menu_8c.html#ae533d5ac8db776760a6e67e35d663e0f">menu_dummy</a>(<span class="keywordtype">void</span>);
<a name="l00075"></a>00075 <span class="keywordtype">void</span> <a class="code" href="menu_8c.html#a8f7edea14f76347e929fa166dce18d9c">menu_standard_top</a>(<span class="keywordtype">void</span>);
<a name="l00076"></a>00076 <span class="keywordtype">void</span> <a class="code" href="menu_8c.html#afa0568eb88f93a4bc69e3670664128ef">menu_standard_phase</a>(<span class="keywordtype">void</span>);
<a name="l00077"></a>00077 <span class="keywordtype">void</span> <a class="code" href="menu_8c.html#aea652e6cfb7ba7d5669f8f5e83224aa0">menu_standard_unit</a>(uint8_t);
<a name="l00078"></a>00078 uint8_t <a class="code" href="menu_8c.html#afa92ae4c0dbc8df1580155a4a4d5ea5f">menu_func_index</a>();
<a name="l00079"></a>00079 <span class="keywordtype">void</span> <a class="code" href="menu_8c.html#a82d64554211ddfdf68ee10d9dee06538">menu_phase_change</a> (<span class="keyword">enum</span> <a class="code" href="menu_8h.html#ae3ccb8a528e1570cbd7e5d9c62922efb">MENU_KEY</a> key,uint8_t pidx);
<a name="l00080"></a>00080 <span class="comment">/* ----------------------------------------------- modyfikacja parametrów ----- */</span>
<a name="l00081"></a>00081 
<a name="l00082"></a>00082 <span class="keywordtype">void</span> <a class="code" href="menu_8c.html#aa9eac2cee8e83e49d544d69e99635e5d">menu_inc_uint8</a> (<span class="keyword">enum</span> <a class="code" href="menu_8h.html#ae3ccb8a528e1570cbd7e5d9c62922efb">MENU_KEY</a> key,uint8_t* var,uint8_t max,uint8_t);
<a name="l00083"></a>00083 <span class="keywordtype">void</span> <a class="code" href="menu_8c.html#a16bc0de0049757358dc00bf026c33f53">menu_dec_uint8</a> (<span class="keyword">enum</span> <a class="code" href="menu_8h.html#ae3ccb8a528e1570cbd7e5d9c62922efb">MENU_KEY</a> key,uint8_t* var,uint8_t min,uint8_t);
<a name="l00084"></a>00084 <span class="keywordtype">void</span> <a class="code" href="menu_8c.html#adc234291ffc7ac267e4514673f0b3bb7">menu_zero_uint8</a> (<span class="keyword">enum</span> <a class="code" href="menu_8h.html#ae3ccb8a528e1570cbd7e5d9c62922efb">MENU_KEY</a> key,uint8_t* var);
<a name="l00085"></a>00085 <span class="keywordtype">void</span> <a class="code" href="menu_8c.html#a3310cf25a7aabfd36cc6d676f59989af">menu_toggle_bit</a>(<span class="keyword">enum</span> <a class="code" href="menu_8h.html#ae3ccb8a528e1570cbd7e5d9c62922efb">MENU_KEY</a>,uint8_t*,uint8_t);
<a name="l00086"></a>00086 
<a name="l00087"></a>00087 <span class="keywordtype">void</span> <a class="code" href="menu_8c.html#ab11ed4942c8cba25ab4e1c0a0cbd89ff">menu_mod_bit</a>(uint8_t posx,uint8_t posy,uint8_t *var,uint8_t bit);
<a name="l00088"></a>00088 <span class="keywordtype">void</span> <a class="code" href="menu_8c.html#a40793435f1de41a1ab1a0abc2d356e4e">menu_mod_uint8</a>(uint8_t posx,uint8_t posy, uint8_t *var, uint8_t min, uint8_t max,uint8_t reload);
<a name="l00089"></a>00089 <span class="keywordtype">void</span> <a class="code" href="menu_8c.html#a432acd1c64fc98c13a31263e134b1ea4">menu_mod_char</a>(uint8_t posx,uint8_t posy,<span class="keywordtype">char</span> *var,uint8_t base);
<a name="l00090"></a>00090 <span class="keywordtype">void</span> <a class="code" href="menu_8c.html#ac90d9cf31686f872d97109c13f0d36c2">menu_mod_temp</a>(uint8_t posx,uint8_t posy, <a class="code" href="aquamat_8h.html#a1540f4879d7cf61a5045f830883d843b">TEMP</a> *var);
<a name="l00091"></a>00091 
<a name="l00092"></a>00092 <span class="comment">/* ------------------------------------------------ externy -------------- */</span>
<a name="l00093"></a>00093 
<a name="l00094"></a>00094 <span class="keyword">extern</span> <span class="keyword">struct </span><a class="code" href="structMENU__STATE.html" title="Struktura przechowująca stan menu.">MENU_STATE</a> <a class="code" href="menu_8c.html#adb7445968ccec9ca2d1977ae7d60edde">ms</a>;
<a name="l00095"></a>00095 <span class="keyword">extern</span> <a class="code" href="strings_8c.html#a26b9ec0fb804ea53b17c2933f041f52f">PROGMEM</a> <span class="keyword">const</span> uint8_t <a class="code" href="menu_8h.html#afe2223b16722108c361706703e6c8aba">MENU_LENGTH</a>[];
<a name="l00096"></a>00096 <span class="keyword">extern</span> <a class="code" href="strings_8c.html#a26b9ec0fb804ea53b17c2933f041f52f">PROGMEM</a> <span class="keyword">const</span> uint8_t <a class="code" href="menu_8h.html#af8aa26bf0f43e58338299be33649f3de">TEMP_CONVERT_DEC_TO_DS</a>[];
<a name="l00097"></a>00097 <span class="keyword">extern</span> <a class="code" href="strings_8c.html#a26b9ec0fb804ea53b17c2933f041f52f">PROGMEM</a> <span class="keyword">const</span> uint8_t <a class="code" href="menu_8h.html#a50d2b3ef52ff35d24b62df8b9ade0487">TEMP_CONVERT_DS_TO_DEC</a>[];
<a name="l00098"></a>00098 <span class="keyword">extern</span> <span class="keyword">volatile</span> <span class="keyword">enum</span> <a class="code" href="menu_8h.html#ae3ccb8a528e1570cbd7e5d9c62922efb">MENU_KEY</a> <a class="code" href="menu_8h.html#a9a92d0429a393370e8f8455b223fefa8">key_pressed</a>;
<a name="l00099"></a>00099 
<a name="l00100"></a>00100 
<a name="l00101"></a>00101 
</pre></div></div>
<hr size="1">
<div style="text-align: center;">
<small>Projekt udostępniony jest na zasadach Open Source. Zapoznaj się z warunkami licencji w pliku COPYING znajdujacym się w katalogu głównym.	</small>
</div>

<hr size="1">
<div style="text-align: center;">
Aquamat - sterownik akwarystyczny Open Source
<br/>
Copyright (C) 2009  <a href="http://todryk.pl">Wojciech Todryk</a> (wojciech(at)todryk(dot)pl)
</div>

<div style="text-align: right;">
<small>Dokumentację wygenerowano za pomocą programu&nbsp;</small>
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a>
<small> wersja 1.6.1 (Fri Apr 23 22:48:16 2010)&nbsp;</small>
</div>
